import _action from "../_action";
import _data from "../_data";
import websocket from '..//websocket';
export default {
    /** 获得好友列表 */
    getFriendList(){
        _get.getFriendList({ up: 1});
    },
    /** 新好友提醒 */
    newFriend(data){
        _action.playVoice('/static/voice/friend.mp3');
        let num = _data.data('new_friend_tips_num') + (data.num * 1);
        _data.data('new_friend_tips_num',num);
        _action.setStatusTips();
    },
    friendList(data){
        let friend_list = _data.localData('friend_list');
        if(!friend_list){
            friend_list = [];
        }
        _data.localData('friend_list',friend_list);
        uni.$emit('friend_list',friend_list);
    },
    /** 获得好友申请列表数据 */
    friendApplyList(data) {
            _data.localData('data_friend_apply_list', data.data);
            uni.$emit('data_friend_apply_list', data.data);
    }
}
